<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title>网站后台管理模版</title>
<link rel="stylesheet" type="text/css"
	href="assets/admin/layui/css/layui.css" />
<link rel="stylesheet" type="text/css" href="assets/admin/css/admin.css" />
</head>

<body>
	<div class="page-content-wrap" id="studentSearch">
	<h5 style="text-align:center;font-size: 20px;line-height: 25px;color:#666">我的成绩</h5>
		<hr>
		<div class="layui-form-item">
			<div class="layui-inline tool-btn">
<!--				<input type="hidden" name="stuId" id="stuId"/>-->
<!--				<button class="layui-btn layui-btn-small site-demo-active"-->
<!--					data-type="tabAdd">-->
<!--					<i class="layui-icon">&#xe654;</i>-->
<!--				</button>-->
<!-- 				<button
					class="layui-btn layui-btn-small layui-btn-warm listOrderBtn hidden-xs"
					data-url="/admin/category/listorderall.html">
					<i class="iconfont">&#xe656;</i>
				</button> -->
			</div>
<!--			<div class="layui-inline">-->
<!--				<input type="text" id="studentNameSearch" placeholder="请输入学生姓名"-->
<!--					autocomplete="off" class="layui-input">-->
<!--			</div>-->
<!--			<button class="layui-btn layui-btn-normal site-demo-active"-->
<!--					data-type="search" id="searchStudent">搜索</button>-->
			<table class="layui-table"
				lay-data="{ url:'/score/getMyScore', page:true, id:'scoreTest'}"
				lay-filter="demo">
				<thead>
					<tr>
						<th lay-data="{field:'id',sort: true}">成绩编号</th>
						<th lay-data="{field:'stuName'}">姓名</th>
						<th lay-data="{field:'subName'}">考试科目</th>
						<th lay-data="{field:'score'}">成绩</th>
<!--						<th-->
<!--							lay-data="{fixed: 'right', width:220, align:'left', toolbar: '#barDemo'}"></th>-->
					</tr>
				</thead>
			</table>
		</div>

		<script src="assets/js/jquery-3.3.1.min.js"></script>
		<script src="assets/admin/js/login-interceptor.js"></script>
		<script type="text/html" id="barDemo">
<!--  <a class="layui-btn layui-btn-normal layui-btn-sm" lay-event="detail">查看</a>-->
<!--  <a class="layui-btn layui-btn-sm" lay-event="edit">编辑</a>-->
<!--  <a class="layui-btn layui-btn-danger layui-btn-sm" lay-event="del">删除</a>-->
	</script>
		<hr></hr>
		<h5 style="text-align: center;">@学生成绩管理系统</h5>
	</div>
	<script src="assets/admin/layui/layui.all.js" type="text/javascript"
		charset="utf-8"></script>
	<script>
		layui.use('table', function() {
			var $ = layui.jquery
			var table = layui.table;
			//监听表格复选框选择
			table.on('checkbox(demo)', function(obj) {
				console.log(obj)
			});
			//监听工具条
			table.on('tool(demo)', function(obj) {
				var data = obj.data;
				if (obj.event === 'detail') {
					var detailFrom = layui.layer.open({
				        title : "查看成绩信息",
				        type : 2,
				        content : "/score-detail.html",//弹出层页面
				        area: ['500px', '200px'],
				        success : function(layero, index){
				            var body = layui.layer.getChildFrame('body', index);
				            body.find("#id").text(data.id);
				            body.find("#stuName").text(data.stuName);
				            body.find("#subName").text(data.subName);
				            body.find("#score").text(data.score);
				        }});
				}
			});

		});
	</script>
</body>

</html>